<?php
namespace app\common\request\jy;

class Order extends Base {

	public function create_order() {
		$pid       = $this->post('pid');
		$aid       = $this->post('aid');
		$psid      = $this->post('psid');
		$num       = $this->post('num');
		$spreadid  = $this->post('spreadid', 0);
		$take_type = $this->post('take_type', 0);
		$uid       = $this->get_current_uid();
		$ip        = $this->ip();
		$balance   = $this->post('balance', 0);
		return compact('pid', 'aid', 'psid', 'num', 'spreadid', 'take_type', 'uid', 'ip', 'balance');
	}

	public function cart() {
		$post = [];
		$post['cids']      = $this->post('cids');
		$post['aid']       = $this->post('aid');
		$post['spreadid']  = $this->post('spreadid', 0);
		$post['take_type'] = $this->post('take_type');
		$post['uid'] = $this->get_current_uid();
		$post['ip'] = $this->ip();
		$post['balance'] = $this->post('balance', 0);
		return $post;
	}

	public function private_list() {
		$limit = $this->param('limit');
		$uid = $this->get_current_uid();
		$take_type = $this->post('take_type');
		$status = $this->post('status');
		$order = $this->post('order', 'createtime');
		$order_type = $this->post('order_type', 'desc');
		return compact('limit', 'uid', 'take_type', 'status', 'order', 'order_type');
	}

	public function store_list() {
		$limit = $this->param('limit');
		$sid = $this->get_current_store_id();
		$take_type = $this->post('take_type');
		$status = $this->post('status');
		$order = $this->post('order', 'createtime');
		$order_type = $this->post('order_type', 'desc');
		return compact('limit', 'sid', 'take_type', 'status', 'order', 'order_type');
	}

	public function send_product() {
		$id = $this->get_id();
		$tracking = $this->post('tracking');
		return compact('id', 'tracking');
	}

	public function preview_look4out_trade_no() {
		$out_trade_no = $this->post('out_trade_no');
		$uid = $this->get_current_uid();
		return compact('uid', 'out_trade_no');
	}

	public function set_msg_jump_path() {
		$path = $this->post('path');
		return compact('path');
	}
}
